package com.awenhui.demo.core.utils;

import com.awenhui.demo.core.utils.poi.ExcelHeader;

import java.io.Serializable;
import java.util.Date;

/**
 * @author yuxf
 * @version 1.0
 * @date 2020/7/23 20:47
 */
public class PersonJb implements Comparable<PersonJb>, Serializable {

    public static final long serialVersionUID = 1L;

    @Override
    public int compareTo(PersonJb o) {
        return this.age - o.getAge();
    }


    public PersonJb(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @ExcelHeader(value = "姓名", index = 1)
    private String name;
    @ExcelHeader(value = "年龄", index = 4)
    private int age;
    @ExcelHeader(value = "生日", index = 5)
    private Date birth;
    @ExcelHeader(value = "浪狼", index = 3)
    private Long longg;
    @ExcelHeader(value = "大宝", index = 2)
    private Double aDouble;

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public Long getLongg() {
        return longg;
    }

    public void setLongg(Long longg) {
        this.longg = longg;
    }

    public Double getaDouble() {
        return aDouble;
    }

    public void setaDouble(Double aDouble) {
        this.aDouble = aDouble;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "PersonJb{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", birth=" + birth +
                ", longg=" + longg +
                ", aDouble=" + aDouble +
                '}';
    }
}
